package cn.edu.just.firstjavaapp.l17;

public class Main02 {
    public static void main(String[] args) throws InterruptedException {

        Thread thread = new Thread(new MyCountRunnable());
        thread.setName("王五");
        thread.start();
        thread.join(2000);
        thread.interrupt();
        for(int i=1;i<=10;i++){
            System.out.println(Thread.currentThread().getName()+i);
            Thread.sleep(1000);
        }


    }
}
